import Vue from 'vue'
import Router from 'vue-router'
//1. 引入组件
import Login from '@/components/login'
import Main from '@/components/main'

// --------------gdones-server 子组件引入---------------------
import AccountIndex from '@/components/account/index' // 用户管理界面
import ParamIndex from '@/components/param/index' // 字典管理
import MenuIndex from '@/components/menu/index' // 菜单管理
import RoleIndex from '@/components/role/index' // 角色管理
import LogIndex from '@/components/log/index' // 角色管理
import TestIndex from '@/components/test/index' // 角色管理
import StaffIndex from '@/components/staff/index' // 管理员管理
import PlatformIndex from '@/components/platform/index' // 平台设置
import StationIndex from '@/components/station/index' // 岗位管理
import OrgIndex from '@/components/organization/index' // 部门管理

// --------------gdones-wms 子组件引入---------------------
import classificationIndex from '@/components/wms/classification/index' // 物资分类
import classificationModelIndex from '@/components/wms/classification/model' // 物资型号
import  warehouseIndex from '@/components/wms/warehouse/index' // 仓库管理
import recordIndex from '@/components/wms/record/index'; // 物资台账
import outboundIndex from '@/components/wms/outbound/index'; // 物资出库管理
import inboundIndex from '@/components/wms/inbound/index'; // 物资入库管理
import inboundPage from '@/components/wms/inbound/inbound'; // 物资入库-添加页面
import carsIndex from '@/components/wms/cars/index'; // 运力管理

//--------------gdones-gpt 子组件引入--------------------------
import webAccountIndex from '@/components/gpt/webAccount/index'; // 账号库
import modesIndex from '@/components/gpt/modes/index'; // 模型库
import modestemplateIndex from '@/components/gpt/modestemplate/index' // 激活码模板
import activeCodeIndex from '@/components/gpt/activecode/index'// 激活卡信息
import gptStaffIndex from '@/components/gpt/staff/index'// Aily客户信息
import gptMaskIndex from '@/components/gpt/mask/index'; // 面具指令管理
import gptDocsIndex from '@/components/gpt/docs/index'; // 文档文章
import payTemplateIndex from '@/components/gpt/paytemplate/index'; // 支付模板
import noticeIndex from '@/components/gpt/notice/index'; // 通知模块

Vue.use(Router)

export default new Router({
  mode: 'hash',// 路由地址前面就不会有/#/
  // 所有路由信息-集合
  routes: [// 第一个路由记录就是欢迎页
    {
      path: '/',
      name: 'Login',
      component: Login,
      meta: {
        index: 0,
        name: "登录页面"
      }
    },
    {
      path: '/main',
      name: 'Main',
      component: Main,
      meta: {
        index: 1,
        name: "首页"
      },
      children: [// main 的子路由
        {
          path: '/account/index',  // /功能模块/页面描述名称
          name: 'AccountIndex',
          component: AccountIndex,
          meta: {
            index: 1 - 1,
            name: "账户管理"
          }
        },
        {
          path: '/param/index',  // /功能模块/页面描述名称
          name: 'ParamIndex',
          component: ParamIndex,
          meta: {
            index: 1 - 2,
            name: "字典管理"
          }
        },
        {
          path: '/menu/index',
          name: 'MenuIndex',
          component: MenuIndex,
          meta: {
            index: 1 - 3,
            name: "菜单管理"
          }
        },
        {
          path: '/role/index',
          name: 'RoleIndex',
          component: RoleIndex,
          meta: {
            index: 1 - 4,
            name: "角色管理"
          }
        },
        {
          path: '/log/index',
          name: 'LogIndex',
          component: LogIndex,
          meta: {
            index: 1 - 5,
            name: "日志管理"
          }
        },
        {
          path: '/test/index',
          name: 'TestIndex',
          component: TestIndex,
          meta: {
            index: 111,
            name: "测试调试页面"
          }
        },
        {
          path: '/staff/index',
          name: 'StaffIndex',
          component: StaffIndex,
          meta: {
            index: 2 - 1,
            name: "管理员管理"
          }
        },
        {
          path: '/platform/index',
          name: 'PlatformIndex',
          component: PlatformIndex,
          meta: {
            index: 1 - 11,
            name: "平台设置"
          }
        },
        {
          path: '/station/index',
          name: 'StationIndex',
          component: StationIndex,
          meta: {
            index: 1 - 12,
            name: "岗位管理"
          }
        },
        {
          path: '/org/index',
          name: 'OrgIndex',
          component: OrgIndex,
          meta: {
            index: 1 - 13,
            name: "部门管理"
          }
        },
        {
          path: '/classification/index',
          name: 'classificationIndex',
          component: classificationIndex,
          meta: {
            index: 2 - 1,
            name: "物资分类"
          }
        },
        {
          path: '/classification/model',
          name: 'classificationModelIndex',
          component: classificationModelIndex,
          meta: {
            index: 2 - 2,
            name: "物资型号"
          }
        },
        {
          path: '/warehouse/index',
          name: 'warehouseIndex',
          component: warehouseIndex,
          meta: {
            index: 2 - 3,
            name: "仓库管理"
          }
        },
        {
          path: '/record/index',
          name: 'recordIndex',
          component: recordIndex,
          meta: {
            index: 2 - 4,
            name: "物资台账"
          }
        },
        {
          path: '/outbound/index',
          name: 'outboundIndex',
          component: outboundIndex,
          meta: {
            index: 2 - 5,
            name: "物资出库管理"
          }
        },
        {
          path: '/inbound/index',
          name: 'inboundIndex',
          component: inboundIndex,
          meta: {
            index: 2 - 6,
            name: "物资入库管理"
          }
        },
        {
          path: '/inbound/add',
          name: 'inboundPage',
          component: inboundPage,
          meta: {
            index: 2 - 7,
            name: "物资入库-新增"
          }
        },
        {
          path: '/car/index',
          name: 'carsIndex',
          component: carsIndex,
          meta: {
            index: 2 - 8,
            name: "运力管理"
          }
        },
        {
          path: '/webAccount/index',
          name: 'webAccountIndex',
          component: webAccountIndex,
          meta: {
            index: 3 - 1,
            name: "账号库"
          }
        },
        {
          path: '/modes/index',
          name: 'modesIndex',
          component: modesIndex,
          meta: {
            index: 3 - 2,
            name: "模型库"
          }
        },
        {
          path: '/modestemplate/index',
          name: 'modestemplateIndex',
          component: modestemplateIndex,
          meta: {
            index: 3 - 3,
            name: "激活码模板"
          }
        },
        {
          path: '/activecode/index',
          name: 'activeCodeIndex',
          component: activeCodeIndex,
          meta: {
            index: 3 - 4,
            name: "激活卡信息"
          }
        },
        {
          path: '/gptstaff/index',
          name: 'gptStaffIndex',
          component: gptStaffIndex,
          meta: {
            index: 3 - 5,
            name: "Aily客户信息"
          }
        },
        {
          path: '/mask/index',
          name: 'gptMaskIndex',
          component: gptMaskIndex,
          meta: {
            index: 3 - 6,
            name: "面具指令管理"
          }
        },
        {
          path: '/docs/index',
          name: 'gptDocsIndex',
          component: gptDocsIndex,
          meta: {
            index: 3 - 7,
            name: "文档文章管理"
          }
        },
        {
          path: '/payTemplate/index',
          name: 'payTemplateIndex',
          component: payTemplateIndex,
          meta: {
            index: 3 - 8,
            name: "支付模板管理"
          }
        },
        {
          path: '/notice/index',
          name: 'noticeIndex',
          component: noticeIndex,
          meta: {
            index: 3 - 9,
            name: "通知管理"
          }
        }
      ]
    }
  ]
})
